<template>
  <div id="community">
    <el-table border :data="detail.list" stripe style="width: 100%">
      <el-table-column type="index" label="序号" width="100" align="center"/>
      <el-table-column prop="fno" label="楼层号" align="center" />
      <el-table-column prop="rno" label="教室号" align="center"/>
      <el-table-column prop="sno" label="座位号" align="center"/>
      <el-table-column fixed="right" align="center" label="座位状态">
        已选座
      </el-table-column>
    </el-table>
  </div>
</template>

<script>

import axios from "axios";
import qs from "querystring";
export default {
  name: "SelectUserVue",
  data() {
    return {
      detail: [
        {
          list: [{}],
        },
      ],
      current: {},
      dialogFormVisible: false,
    };
  },
  methods: {
    mount() {
        let fno=this.$store.state.seatInfo.fno;
        let rno=this.$store.state.seatInfo.rno;
        console.log(fno,rno);
      axios
        .post(
          "http://localhost:8080/library/allSelected",
          qs.stringify({fno,rno}),
          {
            headers: {
              "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
            },
          }
        )
        .then((res) => {
          console.log(res.data);
          if (res.data.code == 1) {
              console.log(res.data.data);
            this.detail.list = res.data.data;
          } else {
            console.log("error");
          }
        });
    },
  },
  mounted() {
    this.mount();
  },
};
</script>

<style>
.el-table .warning-row {
  color: cadetblue;
}
.el-table .success-row {
  color:coral;
}
</style>